import {
	apiResquest
} from '@/common/request.js'


export const userPlanlist = (query) => {
	return apiResquest({
		url: '/customer/proplan/plan/userPlanlist',
		method: 'GET',
		query,
	})
}
export const listTreeByPlanEqmId = (query) => {
	return apiResquest({
		url: '/proplan/plan/process/listTreeByPlanEqmId',
		method: 'GET',
		query,
	})
}
export const processcomplete = (query) => {
	return apiResquest({
		url: '/customer/proplan/process/complete',
		method: 'POST',
		query,
	})
}

export const getFileByProcessId = (query) => {
	return apiResquest({
		url: '/proplan/plan/process/getFileByProcessId',
		method: 'GET',
		query,
	})
}


export const keyimportantlistnotpage = (query) => {
	return apiResquest({
		url: '/proplan/plan/keyimportant/listnotpage',
		method: 'GET',
		query,
	})
}
export const keyimportantlist = (query) => {
	return apiResquest({
		url: '/proplan/plan/keyimportant/list',
		method: 'GET',
		query,
	})
}
export const filedelete = (keyId,fileId) => {
	return apiResquest({
		url: '/proplan/plan/keyimportant/filedelete?keyId=' + keyId + '&fileId=' + fileId,
		method: 'DELETE',
	})
}
export const itemFiledelete = (itemId,fileId) => {
	return apiResquest({
		url: '/proplan/plan/adjusttype/item/filedelete?itemId=' + itemId + '&fileId=' + fileId,
		method: 'DELETE',
	})
}

export const getUserList = () => {
	return apiResquest({
		url: '/system/user/listnopage',
		method: 'GET'
	})
}
export const getRoleUserList = (query) => {
	return apiResquest({
		url: '/system/user/roleUserList',
		method: 'GET',
		query
	})
}
export const getAdjustItemList = (query) => {
	return apiResquest({
		url: '/proplan/plan/adjusttype/item/list',
		method: 'GET',
		query
	})
}
export const adjusttypeitemSave = (query) => {
	return apiResquest({
		url: '/proplan/plan/adjusttype/item/save',
		method: 'POST',
		query
	})
}
export const adjusttypeitemSaveMemo = (query) => {
	return apiResquest({
		url: '/proplan/plan/adjusttype/item/synRectification',
		method: 'POST',
		query
	})
}
export const adjusttypeBatchPass = (query) => {
	return apiResquest({
		url: '/proplan/plan/adjusttype/item/batchPass',
		method: 'POST',
		query,
		headers:{
			'content-type': 'application/x-www-form-urlencoded'
		},
	})
}

export const getUnitList = () => {
	return apiResquest({
		url: '/mes/md/unitmeasure/listnopage',
		method: 'GET',
	})
}
export const getAjusttypeList = (query) => {
	return apiResquest({
		url: '/proplan/plan/adjusttype/list',
		method: 'GET',
		query
	})
}
export const shakeDowndelete = (id) => {
	return apiResquest({
		url: '/proplan/plan/adjusttype/item/delete?id=' + id,
		method: 'DELETE',
	})
}
export const getMatershortageList = (query) => {
	return apiResquest({
		url: '/proplan/plan/matershortage/record/list',
		method: 'GET',
		query
	})
}
export const saveMatershortage = (query) => {
	return apiResquest({
		url: '/proplan/plan/matershortage/record/save',
		method: 'POST',
		query
	})
}
export const matershortagedelete = (id) => {
	return apiResquest({
		url: '/proplan/plan/matershortage/record/delete?id=' + id,
		method: 'DELETE',
	})
}
export const getMatershortageItemList = (query) => {
	return apiResquest({
		url: '/proplan/plan/matershortage/record/item/list',
		method: 'GET',
		query
	})
}
export const saveMatershortageItem = (query) => {
	return apiResquest({
		url: '/proplan/plan/matershortage/record/item/save',
		method: 'POST',
		query
	})
}
export const matershortageItemdelete = (id) => {
	return apiResquest({
		url: '/proplan/plan/matershortage/record/item/delete?id=' + id,
		method: 'DELETE',
	})
}
export const getEquipmentList = (query) => {
	return apiResquest({
		url: '/proplan/plan/equipment/list',
		method: 'GET',
		query
	})
}
export const getGroupNoPage = (query) => {
	return apiResquest({
		url: '/proplan/workgroup/listnotpage',
		method: 'GET',
		query
	})
}
export const eqmbomlist = (query) => {
	return apiResquest({
		url: '/proplan/eqmbom/list',
		method: 'GET',
		query
	})
}
export const updateStatus = (query) => {
	return apiResquest({
		url: '/proplan/plan/equipment/updateStatus',
		method: 'POST',
		headers:{
			'content-type': 'application/x-www-form-urlencoded'
		},
		query
	})
}